'   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 '           N a m e :   W X M _ S e r v o T e s t _ 4 . t x t                                       D a t e :   1 6   O c t o b e r   2 0 1 9 
 
 '         A u t o r :   L e o n a r d o   D E   P A L O   P h . D . 
 
 '         S c o p e :   T e s t i n g   t h e   S E R V O   f o r   D I G I T A L   G R I P P E R . 
 
 '   H a r d w a r e :   S t a n d a r d   M A S T E R .   S e e   t h e   s c h e m a t i c s . 
 
 '   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 L o a d   T o c . w a v 
 
 S p e e d   9 
 
 
 
 B u t t o n   3   T e x t   " H O M E   0 " 
 
 B u t t o n   4   T e x t   " H O M E   5 0 0 " 
 
 B u t t o n   5   T e x t   " H O M E   1 0 0 0 " 
 
 
 
 B u t t o n   7   T e x t   " S T A R T   T E S T " 
 
 
 
 L o a d   T h e r e m i n o _ H A L \ T h e r e m i n o _ H A L . e x e 
 
 L o a d   T h e r e m i n o _ H A L \ T h e r e m i n o _ S l o t V i e w e r . e x e 
 
 ' L o a d   T h e r e m i n o _ H A L \ T h e r e m i n o _ S i g n a l S c o p e . e x e 
 
 L o a d   T h e r e m i n o _ H A L \ T h e r e m i n o _ M i c r o V i d e o . e x e 
 
 ' L o a d   T h e r e m i n o _ H A L \ T h e r e m i n o _ S i g n a l S c o p e . e x e 
 
 
 
 
 
 V a r i a b l e   N u m e r i c   N u m T e s t s 
 
 V a r i a b l e   N u m e r i c   T e s t 
 
 V a r i a b l e   N u m e r i c   D e s t i n a t i o n 
 
 
 
 V a r i a b l e   N u m e r i c   S l o t _ F i r s t S e n s o r 
 
 V a r i a b l e   N u m e r i c   S l o t _ F i r s t S e r v o 
 
 
 
 S l o t _ F i r s t S e n s o r   =   	 1 
 
 S l o t _ F i r s t S e r v o   =   6 
 
 
 
 S t o p 
 
 
 
 L a b e l   " H O M E   0 " 
 
 	 D e s t i n a t i o n   =   4 5 
 
 	 G o s u b   M o v e A l l M o t o r s 
 
 R e t u r n 
 
 
 
 L a b e l   " H O M E   5 0 0 " 
 
 	 D e s t i n a t i o n   =   5 0 0 
 
 	 G o s u b   M o v e A l l M o t o r s 
 
 R e t u r n 
 
 
 
 L a b e l   " H O M E   1 0 0 0 " 
 
 	 D e s t i n a t i o n   =   9 5 0 
 
 	 G o s u b   M o v e A l l M o t o r s 
 
 R e t u r n 
 
 
 
 L a b e l   M o v e A l l M o t o r s 
 
 	 F o r   v 1   =   0   T o   4 
 
 	 	 S l o t ( S l o t _ F i r s t S e r v o   +   v 1 )   =   D e s t i n a t i o n 
 
 	 	 W a i t   S e c o n d s   0 . 3 
 
 	 N e x t 
 
 R e t u r n 
 
 
 
 
 
 '   = = = = = = = = = = = = = = =     T   E   S   T     = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 L a b e l   " S T A R T   T E S T " 
 
 	 s 9   =   " S e r v o T e s t R e s u l t s . t x t " 
 
 	 S 8   =   " -   D A T E   -   "   +   "   -   T I M E   -   " 
 
 	 S a v e   S t r i n g T o F i l e   s 8   s 9 
 
 	 S a v e   S t r i n g T o F i l e   " -   =   -   =   -   =   -     S T A R T     -   =   -   =   -   =   -   "   s 9 
 
 	 ' 
 
 	 ' N u m T e s t s   =   I n p u t   " T e l l   m e   h o w   m a n y   c y c l e : " 
 
 	 N u m T e s t s   =   1 0 0 
 
 	 ' 
 
 	 F o r   T e s t   =   1   T o   N u m T e s t s 
 
 	 	 D e s t i n a t i o n   =   4 5 
 
 	 	 G o s u b   T e s t A l l M o t o r s 
 
 	 	 
 
 	 	 D e s t i n a t i o n   =   5 0 0 
 
 	 	 G o s u b   T e s t A l l M o t o r s 
 
 	 	 
 
 	 	 D e s t i n a t i o n   =   9 5 0 
 
 	 	 G o s u b   T e s t A l l M o t o r s 
 
 	 	 
 
 	 	 D e s t i n a t i o n   =   5 0 0 
 
 	 	 G o s u b   T e s t A l l M o t o r s 
 
 	 N e x t 
 
 R e t u r n 
 
 
 
 L a b e l   T e s t A l l M o t o r s 
 
 	 F o r   v 1   =   0   T o   4 
 
 	 	 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   M o v e 
 
 	 	 S l o t ( S l o t _ F i r s t S e r v o   +   v 1 )   =   D e s t i n a t i o n 
 
 	 	 W a i t   S e c o n d s   0 . 3 
 
 	 	 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   R e a d   s e n s o r   s t a t u s 
 
 	 	 s 2   =   S l o t ( S l o t _ F i r s t S e n s o r   +   v 1 ) 
 
 	 	 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   P r e p a r e   t h e   c o m p a r e   s t r i n g 
 
 	 	 s 3   =   " 0 " 
 
 	 	 I f   D e s t i n a t i o n   =   5 0 0 
 
 	 	 	 s 3   =   " 1 0 0 0 " 
 
 	 	 E n d I f 
 
 	 	 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   T e s t   i f   t h e   s t a t u s   i s   O K 
 
 	 	 I f   s 2   =   s 3 
 
 	 	 	 s 4   =   " O K " 	 	 
 
 	 	 E l s e 
 
 	 	 	 s 4   =   " * * * *   F A I L   * * * * "   
 
 	 	 	 L o a d   T o c . w a v 
 
 	 	 	 '   t o d o   a l a r m 
 
 	 	 	 W a i t   S e c o n d s   0 . 3 
 
 	 	 E n d I f 
 
 	 	 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   S a v e / p r i n t   r e p o r t s 
 
 	 	 s 1   =   N o w   +   "   T e s t   "   +   T e s t   +   "   "   +   "   M o t o r   "   +   ( v 1 + 1 )   +   "   "   +   D e s t i n a t i o n 
 
 	 	 s 1   =   P a d R i g h t ( s 1 , 4 2 )   +   s 2   
 
 	 	 s 1   =   P a d R i g h t ( s 1 , 5 0 )   +   s 4 
 
 	 	 S a v e   S t r i n g T o F i l e   s 1   s 9 
 
 	 	 P r i n t   s 1 
 
 	 N e x t 
 
 R e t u r n 
 
 
 
 ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 ' - - - - -   S   U   B   R   O   U   T   I   N   E       A   R   E   A     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 
 
 ' = = = = = =   D U M M Y   A R E A   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 ' = = = = = =   T O   D O   A R E A   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 ' = = = = = =   S E T   U P   A R E A   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 
 
 ' W A T C H   s 2 
 
 ' W A T C H   s 3 
 
 ' E X E C   S i n 2   =   S i n ( 3 3 ) 
 
 